﻿package mortal.game.view.levelReward.other
{
    import __AS3__.vec.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.utils.*;

    public class LevelRewardGiftDataGroup extends Object
    {
        private var _itemGiftBagInfo:Vector.<ItemData>;
        public var list:Vector.<LevelRewardDataItem>;
        public var level:int;
        public var receiveType:int;
        public var bgType:int = 0;
        public static const Null:int = 0;
        public static const UnReceive:int = 1;
        public static const CanReceive:int = 2;
        public static const HasReceive:int = 3;

        public function LevelRewardGiftDataGroup()
        {
            return;
        }// end function

        public function get itemGiftBagInfos() : Vector.<ItemData>
        {
            var _loc_1:int = 0;
            var _loc_2:ItemData = null;
            if (this._itemGiftBagInfo == null)
            {
                this._itemGiftBagInfo = new Vector.<ItemData>;
                _loc_1 = 0;
                while (_loc_1 < this.list.length)
                {
                    
                    _loc_2 = new ItemData(this.list[_loc_1].id);
                    if (_loc_2.itemInfo && !ItemsUtil.isFitCarrer(_loc_2))
                    {
                    }
                    else
                    {
                        _loc_2.extData = new Object();
                        _loc_2.extData["num"] = this.list[_loc_1].num;
                        this._itemGiftBagInfo.push(_loc_2);
                    }
                    _loc_1++;
                }
            }
            return this._itemGiftBagInfo;
        }// end function

    }
}
